<div class="t_2">
     <div class="fl">概览</div>
     <div class="fr add_form"><a href="javascript:;" id="add_table"></a></div>
</div>
<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
     	<tr>
			<td class="td1">请假单状态：</td>
			<td><?=$this->orderState?></td>
		</tr>
        <tr>
			<td class="td1">申请人：</td>
			<td><?=$this->vacation['nickname']?></td>
		</tr>
     	<tr>
			<td class="td1">请假天数总计：</td>
			<td><?=$this->vacation['total_vacation']?></td>
		</tr>
        <tr>
			<td class="td1">法定节假日：</td>
			<td><?=$this->vacation['statutory_holiday']?></td>
		</tr>
        <tr>
			<td class="td1">请假次数总计：</td>
			<td><?=$this->vacation['sum_vacation']?></td>
		</tr>
		<tr>
			<td class="td1">开始时间：</td>
			<td><?=date('Y-m-d',$this->vacation['start_date'])?></td>
		</tr>
		<tr>
			<td class="td1">结束时间</td>
			<td><?=date('Y-m-d',$this->vacation['end_date'])?></td>
		</tr>
		<tr>
			<td class="td1">备注：</td>
			<td><?=$this->vacation['mark']?></td>
		</tr>
     </table>
</div>
<form id="xxx">
<div class="order_show" id="info_form">
    
	<?php if($this->vacation['audit_state']==$this->step): ?>
		<?php if($this->step!=2): ?>
         <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<tr>
			<td class="td1">下级操作员：</td>
			<td>
				<select name="next_uid" >
					<option value="">请选择</option>
					<?php foreach((array)$this->next_user_list as $user): ?>
					<option value="<?=$user['uid']?>"><?=$user['username']?>[<?=$user['nickname']?>]</option>
					<?php endforeach; ?>
				</select>
			</td>
		</tr>
		<?php endif; ?>
		<tr>
			<td class="td1">操作：</td>
			<td><?=$this->operation?><input type="button" id="notallow" value="不批准请假"/>
            <input type="hidden" id="vid" name="vid" value="<?php echo $this->vacation['vacation_id']; ?>"/>
            </td>
		</tr>
        </table>
		<?php endif; ?>
     
</div>
</form>

<script>
$(function(){
	$('#xxx').submit(function(){
		$.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
			if (data.state > 0)
			{
				window.location.reload();
			}
		},'json');
		return false;
	});
	
	
	// 删除
    $('#notallow').click(function (){
        if(confirm('真的不批准此假条吗？')) 
		{
			var val = $('#vid').val();
            $.getJSON('system.php',{app:'<?php echo APP; ?>',step:<?=$this->step?>,mod:'notallow',vid:val},function(data){
                if (data.state <= 0)
                {
                    alert(data.message);
                    return false;
                }
				alert(data.message);
				window.location.reload();
            });
        }
    });
});
</script>